{% extends "base.html" %}
{% block bodycontent %}
    <!--header end-->
    <div id="mainbody">
        <div class="blogs">
            <div class="newlist">
                <h2><span>
      <a href="/">首页</a>
      <a href="/grzx/abouttest">测试相关</a>
      <a href="/grzx/mytalk">技术杂技</a>
      <a href="/grzx/diary">不知道起什么名</a>
</span>您当前的位置：<a href="/">首页</a>&nbsp;>&nbsp;<a href="/grzx/python/">编程相关</a></h2>

                <ul>
                    {% for x in python_blog %}
                        <p class="ptit"><b><a href="{% url 'article' x.id %}"> {{ x.blog_title }}</a></b></p>
                        <p class="ptime">发布时间：{{ x.blog_timestamp }} 作者：{{ x.blog_author }} 分类：{{ x.blog_type }} </p>
                        <div class="pcon">{{ x.blog_body | slice:':100'|safe }}</div>
                        <div class="line"></div>
                    {% endfor %}
                </ul>

                <div class="page">
                    {% if python_blog.has_previous %}
                        <a href="?page={{ python_blog.previous_page_number }}">上一页</a>
                    {% endif %}
                    <a>{{ python_blog.number }}</a>
                    {% if python_blog.has_next %}
                        <a href="?page={{ python_blog.next_page_number }}">下一页</a>
                    {% endif %}
                </div>
            </div>
            <!--bloglist end-->
            <aside>
                <div class="tuijian">
                    <h2>推荐文章</h2>
                    <ol>
                        {% for title in like_rank %}
                            <li><span><strong>{{ forloop.counter }}</strong></span><a
                                    href="{% url 'article' title.id %}">{{ title.blog_title }}</a></li>
                        {% endfor %}

                    </ol>
                </div>

                <div class="clicks">
                    <h2>热门点击</h2>
                    <ol>

                        {% for foo in hot_rank %}
                            <li><span><a href="{% url 'article' foo.id %}">{{ foo.blog_type }}</a></span><a
                                    href="{% url 'article' foo.id %}">{{ foo.blog_title }}</a></li>
                        {% endfor %}

                    </ol>
                </div>

                <div class="search">
                    <form class="searchform" method="post" action="/search">
                        {% csrf_token %}
                        <input type="text" name="keywords" value="输入文章标题搜索" onfocus="this.value=''"
                               onblur="this.value='输入文章标题搜索'">
                    </form>
                </div>

            </aside>
        </div>
        <!--blogs end-->
    </div>
    <!--mainbody end-->
{% endblock bodycontent %}